home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
X User Tools
/
X User Tools (O'Reilly and Associates)(1994).ISO
/
sun4c
/
archive
/
tcltk.z
/
tcltk
/
man
/
cat3
/
ManageGeom.3
< prev
next >
Wrap
Text File
|
1994-09-20
|
4KB
|
133 lines
Tk_ManageGeometry(3) Tk Library Procedures
_________________________________________________________________
NAME
Tk_ManageGeometry - arrange to handle geometry requests for
a window
SYNOPSIS
#include <tk.h>
Tk_ManageGeometry(_t_k_w_i_n, _p_r_o_c, _c_l_i_e_n_t_D_a_t_a)
ARGUMENTS
Tk_Window _t_k_w_i_n (in) Token for window to
be managed.
Tk_GeometryProc *_p_r_o_c (in) Procedure to invoke
to handle geometry
requests on _t_k_w_i_n,
or NULL to indicate
that _t_k_w_i_n's
geometry shouldn't
be managed anymore.
ClientData _c_l_i_e_n_t_D_a_t_a (in) Arbitrary one-word
value to pass to
_p_r_o_c.
_________________________________________________________________
DESCRIPTION
Tk_ManageGeometry arranges for _p_r_o_c to be invoked whenever
Tk_GeometryRequest is called to change the desired geometry
for _t_k_w_i_n. Tk_ManageGeometry is typically invoked by
geometry managers when they take control of a window's
geometry.
_P_r_o_c should have arguments and results that match the type
Tk_GeometryProc:
typedef void Tk_GeometryProc(
ClientData _c_l_i_e_n_t_D_a_t_a,
Tk_Window _t_k_w_i_n);
The parameters to _p_r_o_c will be identical to the correspond-
ing parameters passed to Tk_ManageGeometry. Typically,
_c_l_i_e_n_t_D_a_t_a points to a data structure containing
application-specific information about how to manage _t_k_w_i_n's
geometry.
_P_r_o_c will be called during each call to Tk_GeometryRequest
for _t_k_w_i_n. _P_r_o_c can use macros like Tk_ReqWidth to retrieve
the arguments passed to Tk_GeometryRequest. It should do
what it can to meet the request, subject to the space avail-
able in _t_k_w_i_n's parent and its own policies for managing
Tk 1
Tk_ManageGeometry(3) Tk Library Procedures
geometry. If _p_r_o_c can meet the request, it should call pro-
cedures like Tk_ResizeWindow or Tk_MoveWindow to carry out
the actual geometry change. In some cases it may make sense
for _p_r_o_c not to process the geometry request immediately,
but rather to schedule a procedure to do it later, using
Tk_DoWhenIdle. This approach is likely to be more efficient
in situations where several geometry requests occur simul-
taneously: only a single geometry change will be made,
after all the requests have been registered.
If _p_r_o_c is specified as NULL, then the geometry handler for
_t_k_w_i_n will be eliminated, leaving _t_k_w_i_n unmanaged. Calls to
Tk_GeometryRequest have no effect for unmanaged windows
except to store the requested size in a structure where they
can be retrieved by macros like Tk_ReqWidth. If
Tk_GeometryRequest has never been invoked for a window then
it is unmanaged.
KEYWORDS
callback, geometry, managed, request, unmanaged
Tk 2